﻿CREATE PROCEDURE [dbo].[message_set_not_read]
    @senderId int,
    @recipientId int,
    @dateOfRead datetime2
AS
UPDATE [dbo].[Messages] SET
    Messages.DateOfRead = @dateOfRead 
    WHERE Messages.RecipientId=@recipientId and Messages.SenderId = @senderId and Messages.DateOfRead IS NULL
RETURN 0
